<%--
  Created by IntelliJ IDEA.
  User: bill
  Date: 2010-7-8
  Time: 19:59:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/core/transition.jsp" %>
<jsp:useBean id="sql" class="java.lang.String" scope="request"/>
<jsp:useBean id="beanID" class="java.lang.String" scope="request"/>
<jsp:useBean id="className" class="java.lang.String" scope="request"/>
<%
    sql = request.getParameter("sql");
    beanID = request.getParameter("beanID");
    className = request.getParameter("className");
    Object result = null;
    try {
        this._transition_init();
        this._transition_begin(true);
        if (className == null || className.length() == 0) {
            result = this._dao_getObject(sql);
        } else {
            result = this._dao_getObject(sql, className);
        }
        this._transition_commit();
    } catch (Exception e) {
        e.printStackTrace();
        try {
            this._transition_rollback();
            this._db_destory(this._db_conn.get(), null, null);
        } catch (SQLException e1) {
            e1.printStackTrace();
        }
    } finally {
        try {
            this._db_destory(this._db_conn.get(), null, null);
        } catch (SQLException e1) {
            e1.printStackTrace();
        }
    }
    request.setAttribute(beanID, result);
%>